<?php echo $this->fetch('header.html'); ?>
<script type="text/javascript" src="<?php echo $this->lib_base . "/" . 'search_goods.js'; ?>" charset="utf-8"></script>
<script type="text/javascript">
var upimg   = '<?php echo $this->res_base . "/" . 'images/up.gif'; ?>';
var downimg = '<?php echo $this->res_base . "/" . 'images/down.gif'; ?>';
imgUping = new Image();
imgUping.src = upimg;
</script>
<?php echo $this->fetch('curlocal_jia.html'); ?>
<div class="content">
    <div class="left g_left">
        <ul>
        	<li><img src="themes/mall/default/styles/default/images/jia1.jpg" /></li>
            <li><img src="themes/mall/default/styles/default/images/jia2.jpg" /></li>
        </ul>
    </div>

    <div class="right g_right">
    	  <?php if ($this->_var['showdiv']): ?>
    	  <div class="module_filter">
            <div class="module_filter_line">
                <ul class="module_filter_nav" ectype="ul_filter">
                <?php endif; ?>
                    <?php $_from = $this->_var['filters']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'filter');if (count($_from)):
    foreach ($_from AS $this->_var['filter']):
?>  
                    <div class="module_filter">
            		<div class="module_filter_line">
		                <ul class="module_filter_nav" ectype="ul_filter">
		                    <li class="normal" ectype="li_filter">
		                        <span class="txt"><?php echo $this->_var['filter']['name']; ?>: <?php echo $this->_var['filter']['value']; ?></span>
		                        <span class="ico"><img src="<?php echo $this->res_base . "/" . 'images/delete.gif'; ?>" title="<?php echo $this->_var['filter']['key']; ?>" /></span>
		                    </li>
		                </ul>
		            </div>
		           </div>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

                    <?php if ($this->_var['keyword_name']): ?>
	                 <li class="normal">
	                     <span class="txt">关键字: <?php echo $this->_var['keyword_name']; ?></span>
	                     <span class="ico">
	                     <a href="<?php echo url('app=search&act=goods'); ?><?php if ($this->_var['cate_id']): ?>&cate_id=<?php echo $this->_var['cate_id']; ?><?php endif; ?><?php if ($this->_var['brand_id']): ?>&brand_id=<?php echo $this->_var['brand_id']; ?><?php endif; ?><?php if ($this->_var['price_id']): ?>&price_id=<?php echo $this->_var['price_id']; ?><?php endif; ?><?php if ($this->_var['region_id']): ?>&region_id=<?php echo $this->_var['region_id']; ?><?php endif; ?>">
	                     <img src="<?php echo $this->res_base . "/" . 'images/delete.gif'; ?>" /></a></span>
	                 </li>
	                 <?php endif; ?>
					<?php if ($this->_var['cate_name']): ?>
	                 <li class="normal">
	                     <span class="txt">美食分类: <?php echo $this->_var['cate_name']; ?></span>
	                     <span class="ico">
	                     <a href="<?php echo url('app=search&act=goods'); ?><?php if ($this->_var['brand_id']): ?>&brand_id=<?php echo $this->_var['brand_id']; ?><?php endif; ?><?php if ($this->_var['price_id']): ?>&price_id=<?php echo $this->_var['price_id']; ?><?php endif; ?><?php if ($this->_var['region_id']): ?>&region_id=<?php echo $this->_var['region_id']; ?><?php endif; ?><?php if ($this->_var['keyword_name']): ?>&keyword=<?php echo $this->_var['keyword_name']; ?><?php endif; ?>">
	                     <img src="<?php echo $this->res_base . "/" . 'images/delete.gif'; ?>" /></a></span>
	                 </li>
	                 <?php endif; ?>
	                 <?php if ($this->_var['brand_name']): ?>
	                 <li class="normal">
	                     <span class="txt">品牌分类: <?php echo $this->_var['brand_name']; ?></span>
	                     <a href="<?php echo url('app=search&act=goods'); ?><?php if ($this->_var['cate_id']): ?>&cate_id=<?php echo $this->_var['cate_id']; ?><?php endif; ?><?php if ($this->_var['price_id']): ?>&price_id=<?php echo $this->_var['price_id']; ?><?php endif; ?><?php if ($this->_var['region_id']): ?>&region_id=<?php echo $this->_var['region_id']; ?><?php endif; ?><?php if ($this->_var['keyword_name']): ?>&keyword=<?php echo $this->_var['keyword_name']; ?><?php endif; ?>">
	                     <span class="ico"><img src="<?php echo $this->res_base . "/" . 'images/delete.gif'; ?>" /></a></span>
	                 </li>
	                 <?php endif; ?>
	                 <?php if ($this->_var['price_name']): ?>
	                 <li class="normal">
	                     <span class="txt">价格分类: <?php echo $this->_var['price_name']; ?></span>
	                     <a href="<?php echo url('act=goods&app=search'); ?><?php if ($this->_var['cate_id']): ?>&cate_id=<?php echo $this->_var['cate_id']; ?><?php endif; ?><?php if ($this->_var['brand_id']): ?>&brand_id=<?php echo $this->_var['brand_id']; ?><?php endif; ?><?php if ($this->_var['region_id']): ?>&region_id=<?php echo $this->_var['region_id']; ?><?php endif; ?><?php if ($this->_var['keyword_name']): ?>&keyword=<?php echo $this->_var['keyword_name']; ?><?php endif; ?>">
	                     <span class="ico"><img src="<?php echo $this->res_base . "/" . 'images/delete.gif'; ?>" /></a></span>
	                 </li>
	                 <?php endif; ?>
	                 <?php if ($this->_var['region_name']): ?>
	                 <li class="normal">
	                     <span class="txt">地区分类: <?php echo $this->_var['region_name']; ?></span>
	                     <a href="<?php echo url('app=search&act=goods'); ?><?php if ($this->_var['cate_id']): ?>&cate_id=<?php echo $this->_var['cate_id']; ?><?php endif; ?><?php if ($this->_var['brand_id']): ?>&brand_id=<?php echo $this->_var['brand_id']; ?><?php endif; ?><?php if ($this->_var['price_id']): ?>&price_id=<?php echo $this->_var['price_id']; ?><?php endif; ?><?php if ($this->_var['keyword_name']): ?>&keyword=<?php echo $this->_var['keyword_name']; ?><?php endif; ?>">
	                     <span class="ico"><img src="<?php echo $this->res_base . "/" . 'images/delete.gif'; ?>" /></a></span>
	                 </li>
	                 <?php endif; ?>
	                 <?php if ($this->_var['showdiv']): ?>
                </ul>
            </div>
           </div>
            <?php endif; ?>
    	<div class="guojia clearfix">
                <div class="wrap_child ">
                	<div class="gg_1 clearfix" >
                        <h2>美食分类:</h2>  
                        <dl id="gg_1">
                        <?php $_from = $this->_var['categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'category');$this->_foreach['fe_category'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_category']['total'] > 0):
    foreach ($_from AS $this->_var['category']):
        $this->_foreach['fe_category']['iteration']++;
?>
                            <dd class="bg_color1 <?php if ($this->_var['category']['cate_id'] == $this->_var['cate_id']): ?>wer<?php endif; ?>">
                            <a href="<?php echo url('app=search&act=goods&cate_id=' . $this->_var['category']['cate_id']. ''); ?><?php if ($this->_var['brand_id']): ?>&brand_id=<?php echo $this->_var['brand_id']; ?><?php endif; ?><?php if ($this->_var['price_id']): ?>&price_id=<?php echo $this->_var['price_id']; ?><?php endif; ?><?php if ($this->_var['region_id']): ?>&region_id=<?php echo $this->_var['region_id']; ?><?php endif; ?><?php if ($this->_var['keyword']): ?>&keyword=<?php echo $this->_var['keyword']; ?><?php endif; ?>">
                            <?php echo htmlspecialchars($this->_var['category']['cate_name']); ?></a></dd>
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                        </dl>
                    </div>
                    <?php if (! $this->_var['filters']['brand']): ?>
                    <div class="gg_1 clearfix">
                        <h2>品牌分类:</h2>  
                        <dl>
                        <?php $_from = $this->_var['brands']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'row');$this->_foreach['fe_brand'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_brand']['total'] > 0):
    foreach ($_from AS $this->_var['row']):
        $this->_foreach['fe_brand']['iteration']++;
?>
                            <dd class="bg_color1 <?php if ($this->_var['row']['brand_id'] == $this->_var['brand_id']): ?>wer<?php endif; ?>">
                            <a href="<?php echo url('app=search&act=goods&brand_id=' . $this->_var['row']['brand_id']. ''); ?><?php if ($this->_var['cate_id']): ?>&cate_id=<?php echo $this->_var['cate_id']; ?><?php endif; ?><?php if ($this->_var['price_id']): ?>&price_id=<?php echo $this->_var['price_id']; ?><?php endif; ?><?php if ($this->_var['region_id']): ?>&region_id=<?php echo $this->_var['region_id']; ?><?php endif; ?><?php if ($this->_var['keyword']): ?>&keyword=<?php echo $this->_var['keyword']; ?><?php endif; ?>">
                            <?php echo htmlspecialchars($this->_var['row']['brand_name']); ?></a></dd>
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                        </dl>
                    </div>
                    <?php endif; ?>
                    <div class="gg_1 clearfix">
                        <h2>价格分类:</h2>  
                        <dl>
                        <?php $_from = $this->_var['price_intervals']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'row');if (count($_from)):
    foreach ($_from AS $this->_var['row']):
?>
                            <dd class="bg_color1 <?php if ($this->_var['row']['tag'] == $this->_var['price_id']): ?>wer<?php endif; ?>">
                            <a href="<?php echo url('act=goods&app=search&price_id=' . $this->_var['row']['tag']. ''); ?><?php if ($this->_var['cate_id']): ?>&cate_id=<?php echo $this->_var['cate_id']; ?><?php endif; ?><?php if ($this->_var['brand_id']): ?>&brand_id=<?php echo $this->_var['brand_id']; ?><?php endif; ?><?php if ($this->_var['region_id']): ?>&region_id=<?php echo $this->_var['region_id']; ?><?php endif; ?><?php if ($this->_var['keyword']): ?>&keyword=<?php echo $this->_var['keyword']; ?><?php endif; ?>">
                            <?php echo htmlspecialchars($this->_var['row']['price_name']); ?></a> </dd>
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                        </dl>
                    </div>
                    <?php if (! $this->_var['filters']['region_id']): ?>
                    <div class="gg_1 clearfix">
                        <h2>地区分类:</h2>  
                        <dl>
                        <?php $_from = $this->_var['regions']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'row');$this->_foreach['fe_region'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_region']['total'] > 0):
    foreach ($_from AS $this->_var['row']):
        $this->_foreach['fe_region']['iteration']++;
?>
                            <dd class="bg_color1 <?php if ($this->_var['row']['region_id'] == $this->_var['region_id']): ?>wer<?php endif; ?>">
                            <a href="<?php echo url('region_id=' . $this->_var['row']['region_id']. '&app=search&act=goods'); ?><?php if ($this->_var['cate_id']): ?>&cate_id=<?php echo $this->_var['cate_id']; ?><?php endif; ?><?php if ($this->_var['brand_id']): ?>&brand_id=<?php echo $this->_var['brand_id']; ?><?php endif; ?><?php if ($this->_var['price_id']): ?>&price_id=<?php echo $this->_var['price_id']; ?><?php endif; ?><?php if ($this->_var['keyword']): ?>&keyword=<?php echo $this->_var['keyword']; ?><?php endif; ?>">
                            <?php echo htmlspecialchars($this->_var['row']['region_name']); ?></a> </dd>
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                        </dl>
                    </div>
                    <?php endif; ?>
                </div>
		</div>


        <div class="shop_con_list">
            <h2>
                <div class="ornament1"></div>
                <div class="ornament2"></div>
                <div class="h2_wrap">
                    <div class="table_title">
                        <p class="title">显示:</p>
                        <p class="list_ico" ectype="display_mode" ecvalue="list" title="以列表显示"></p>
                        <p class="squares_ico" ectype="display_mode" ecvalue="squares" title="以方格显示"></p>
                        <p class="line_ico"></p>
                        <p class="title">排序:</p>
                        <p><select ectype="order_by"><?php echo $this->html_options(array('options'=>$this->_var['orders'],'selected'=>$_GET['order'])); ?></select></p>
                    </div>
                    <div class="top_page">
                        <?php echo $this->fetch('page.top.html'); ?>
                    </div>
                </div>
            </h2>

            <div class="<?php echo $this->_var['display_mode']; ?>" ectype="current_display_mode">
                <?php if ($this->_var['goods_list']): ?>
                <ul class="list_pic">
                    <?php $_from = $this->_var['goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
    foreach ($_from AS $this->_var['goods']):
?>  
                    <li>
                        <p><a href="<?php echo url('app=goods&id=' . $this->_var['goods']['goods_id']. ''); ?>" target="_blank"><img src="<?php echo $this->_var['goods']['default_image']; ?>" /></a></p>
                        <h3>
                            <span class="text_link">
                                <span class="depict">
                                    <a href="<?php echo url('app=goods&id=' . $this->_var['goods']['goods_id']. ''); ?>" target="_blank"><?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?></a>
                                </span>
                                <span class="info">
                                    <span>店铺名称: <?php echo htmlspecialchars($this->_var['goods']['store_name']); ?></span>
                                    <span class="fontColor5"><?php echo htmlspecialchars($this->_var['goods']['grade_name']); ?></span>
                                </span>
                            </span>
                            <span class="price"><?php echo price_format($this->_var['goods']['price']); ?></span>
                            <b>已售: <?php echo ($this->_var['goods']['sales'] == '') ? '0' : $this->_var['goods']['sales']; ?> 件 | <a href="<?php echo url('app=goods&act=comments&id=' . $this->_var['goods']['goods_id']. ''); ?>" target="_blank"><?php echo ($this->_var['goods']['comments'] == '') ? '0' : $this->_var['goods']['comments']; ?> 评论</a></b>
                        </h3>
                    </li>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                    <div class="clear"></div>
                </ul>
            </div>
            <?php else: ?>
              <div class="jia_no"><span>很遗憾，竟然没有找到您想要的美食-。-<br/>赶紧提交给哈美，得免单机会！</span></div>
            <?php endif; ?>
        </div>

        <div class="shop_list_page">
            <?php echo $this->fetch('page.bottom.html'); ?>
        </div>
    </div>
</div>

<?php echo $this->fetch('footer.html'); ?>
